import request from "@/api/index";

// 创建商品接口
export function createGoods(data) {
  return request({
    url: "/goods/createGoods",
    method: "post",
    data,
  });
}

// 获取商品列表接口
export function getGoods(params) {
  return request({
    url: "/goods/getGoods",
    method: "get",
    params,
  });
}
// 修改商品接口
export function updateGoods(data) {
  return request({
    url: "/goods/updateGoods",
    method: "post",
    data,
  });
}
// 审核商品接口
export function checkGoods(data) {
  return request({
    url: "/goods/checkGoods",
    method: "post",
    data,
  });
}
// 删除商品接口
export function delGoods(data) {
  return request({
    url: "/goods/removeGoods",
    method: "post",
    data,
  });
}

// 搜索商品接口
export function searchGoods(params) {
  return request({
    url: "/goods/searchGoods",
    method: "get",
    params,
  });
}

// 获取商品分类接口
export function getGoodsCategory() {
  return request({
    url: "/goods/getGoodsCategory",
    method: "get",
  });
}
